package com.hc.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hc.common.bean.PageBean;
import com.hc.domain.Category;
import com.hc.query.ProductCategoryCondition;
import com.hc.res.CategoryItem;

import java.util.List;

/**
 * @author hecai
 */
public interface CategoryService extends IService<Category> {


    /**
     * 根据条件查询
     *
     * @param condition
     * @return
     */
    PageBean<CategoryItem> queryByCondition(ProductCategoryCondition condition);

    /**
     * 树形方式列出所有的类别
     *
     * @return
     */
    List<CategoryItem> listAllCategories(String key, Boolean flag);
}
